const pics = document.querySelectorAll('.pic')
pics.forEach((pic)=>{
    pic.addEventListener('click', ()=>{
        pics.forEach(pic=>pic.classList.toggle('away'))
        pic.classList.remove('away')
        pic.classList.toggle('active')
    })
})